OpenShadingLanguage 1.00
# Compiled by oslc 1.10.10
# options: -q -O2 -I/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders -I/home/sources/buildbot-worker-linux_centos7/linux_290/lib/linux_centos7_x86_64/osl/shaders -o /home/sources/buildbot-worker-linux_centos7/linux_290/build/intern/cycles/kernel/shaders/node_principled_volume.oso
shader node_principled_volume
param	color	Color	0.5 0.5 0.5		%read{10,10} %write{2147483647,-1}
param	float	Density	1		%read{1,1} %write{2147483647,-1}
param	float	Anisotropy	0		%read{25,25} %write{2147483647,-1}
param	color	AbsorptionColor	0 0 0		%read{16,16} %write{2147483647,-1}
param	float	EmissionStrength	0		%read{32,32} %write{2147483647,-1}
param	color	EmissionColor	1 1 1		%read{37,37} %write{2147483647,-1}
param	float	BlackbodyIntensity	0		%read{33,33} %write{2147483647,-1}
param	color	BlackbodyTint	1 1 1		%read{61,61} %write{2147483647,-1}
param	float	Temperature	1500		%read{42,42} %write{2147483647,-1}
param	string	DensityAttribute	"geom:density"		%read{4,4} %write{2147483647,-1}
param	string	ColorAttribute	"geom:color"		%read{11,11} %write{2147483647,-1}
param	string	TemperatureAttribute	"geom:temperature"		%read{43,43} %write{2147483647,-1}
oparam	closure color	Volume			%read{39,66} %write{31,66}
local	float	primitive_density	%read{6,6} %write{0,4}
local	float	density	%read{2,29} %write{1,7}
local	color	___365_scatter_color	%read{13,18} %write{10,13}
local	color	___365_primitive_color	%read{13,13} %write{11,11}
local	color	___365_scatter_coeff	%read{26,26} %write{14,14}
local	color	___365_absorption_color	%read{21,21} %write{17,17}
local	color	___365_absorption_coeff	%read{29,29} %write{24,24}
local	float	emission_strength	%read{34,37} %write{32,32}
local	float	blackbody_intensity	%read{40,53} %write{33,33}
local	float	___368_T	%read{46,57} %write{42,47}
local	float	___368_temperature	%read{45,45} %write{43,43}
local	float	___368_T4	%read{53,53} %write{50,50}
local	float	___368_sigma	%read{54,54} %write{52,52}
local	float	___368_intensity	%read{55,61} %write{54,54}
local	color	___370_bb	%read{58,65} %write{57,63}
local	float	___370_l	%read{59,62} %write{58,58}
const	float	$const1	1		%read{0,53} %write{2147483647,-1}
const	float	$const2	0		%read{1,59} %write{2147483647,-1}
const	float	$const3	9.99999975e-06		%read{2,55} %write{2147483647,-1}
temp	int	$tmp1	%read{3,3} %write{2,2}
temp	int	$tmp2	%read{5,5} %write{4,4}
temp	float	$tmp3	%read{7,7} %write{6,6}
temp	int	$tmp4	%read{9,9} %write{8,8}
temp	int	$tmp5	%read{12,12} %write{11,11}
temp	color	$tmp6	%read{17,17} %write{16,16}
temp	color	$tmp7	%read{16,16} %write{15,15}
temp	color	$tmp8	%read{24,24} %write{20,20}
temp	color	$tmp9	%read{20,20} %write{18,18}
temp	color	$tmp10	%read{20,20} %write{19,19}
temp	color	$tmp11	%read{24,24} %write{23,23}
temp	color	$tmp12	%read{23,23} %write{21,21}
temp	color	$tmp13	%read{23,23} %write{22,22}
temp	closure color	$tmp14	%read{27,27} %write{25,25}
const	string	$const4	"henyey_greenstein"		%read{25,25} %write{2147483647,-1}
temp	color	$tmp15	%read{27,27} %write{26,26}
temp	closure color	$tmp16	%read{31,31} %write{27,27}
temp	closure color	$tmp17	%read{30,30} %write{28,28}
const	string	$const5	"absorption"		%read{28,28} %write{2147483647,-1}
temp	color	$tmp18	%read{30,30} %write{29,29}
temp	closure color	$tmp19	%read{31,31} %write{30,30}
temp	int	$tmp20	%read{35,35} %write{34,34}
temp	closure color	$tmp21	%read{38,38} %write{36,36}
const	string	$const6	"emission"		%read{36,64} %write{2147483647,-1}
temp	color	$tmp22	%read{38,38} %write{37,37}
temp	closure color	$tmp23	%read{39,39} %write{38,38}
const	float	$const7	0.00100000005		%read{40,40} %write{2147483647,-1}
temp	int	$tmp24	%read{41,41} %write{40,40}
temp	int	$tmp25	%read{44,44} %write{43,43}
temp	float	$tmp26	%read{46,46} %write{45,45}
temp	float	$tmp27	%read{50,50} %write{48,48}
temp	float	$tmp28	%read{50,50} %write{49,49}
const	float	$const8	5.67037297e-08		%read{51,51} %write{2147483647,-1}
const	float	$const9	9.99999997e-07		%read{51,51} %write{2147483647,-1}
temp	float	$tmp29	%read{52,52} %write{51,51}
const	float	$const10	3.14159274		%read{52,52} %write{2147483647,-1}
temp	float	$tmp30	%read{54,54} %write{53,53}
temp	int	$tmp31	%read{56,56} %write{55,55}
temp	int	$tmp32	%read{60,60} %write{59,59}
temp	color	$tmp33	%read{62,62} %write{61,61}
temp	color	$tmp34	%read{63,63} %write{62,62}
temp	closure color	$tmp35	%read{65,65} %write{64,64}
temp	closure color	$tmp36	%read{66,66} %write{65,65}
code ___main___
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:34
#   float primitive_density = 1.0;
	assign		primitive_density $const1 	%filename{"/home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl"} %line{34} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:35
#   float density = max(Density, 0.0);
	max		density Density $const2 	%line{35} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:37
#   if (density > 1e-5) {
	gt		$tmp1 density $const3 	%line{37} %argrw{"wrr"}
	if		$tmp1 8 8 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:38
#     if (getattribute(DensityAttribute, primitive_density)) {
	getattribute	$tmp2 DensityAttribute primitive_density 	%line{38} %argrw{"wrw"}
	if		$tmp2 8 8 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:39
#       density = max(density * primitive_density, 0.0);
	mul		$tmp3 density primitive_density 	%line{39} %argrw{"wrr"}
	max		density $tmp3 $const2 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:43
#   if (density > 1e-5) {
	gt		$tmp4 density $const3 	%line{43} %argrw{"wrr"}
	if		$tmp4 32 32 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:45
#     color scatter_color = Color;
	assign		___365_scatter_color Color 	%line{45} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:47
#     if (getattribute(ColorAttribute, primitive_color)) {
	getattribute	$tmp5 ColorAttribute ___365_primitive_color 	%line{47} %argrw{"wrw"}
	if		$tmp5 14 14 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:48
#       scatter_color *= primitive_color;
	mul		___365_scatter_color ___365_scatter_color ___365_primitive_color 	%line{48} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:52
#     color scatter_coeff = scatter_color;
	assign		___365_scatter_coeff ___365_scatter_color 	%line{52} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:53
#     color absorption_color = sqrt(max(AbsorptionColor, 0.0));
	assign		$tmp7 $const2 	%line{53} %argrw{"wr"}
	max		$tmp6 AbsorptionColor $tmp7 	%argrw{"wrr"}
	sqrt		___365_absorption_color $tmp6 	%argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:54
#     color absorption_coeff = max(1.0 - scatter_color, 0.0) * max(1.0 - absorption_color, 0.0);
	sub		$tmp9 $const1 ___365_scatter_color 	%line{54} %argrw{"wrr"}
	assign		$tmp10 $const2 	%argrw{"wr"}
	max		$tmp8 $tmp9 $tmp10 	%argrw{"wrr"}
	sub		$tmp12 $const1 ___365_absorption_color 	%argrw{"wrr"}
	assign		$tmp13 $const2 	%argrw{"wr"}
	max		$tmp11 $tmp12 $tmp13 	%argrw{"wrr"}
	mul		___365_absorption_coeff $tmp8 $tmp11 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:55
#     Volume = scatter_coeff * density * henyey_greenstein(Anisotropy) +
	closure		$tmp14 $const4 Anisotropy 	%line{55} %argrw{"wrr"}
	mul		$tmp15 ___365_scatter_coeff density 	%argrw{"wrr"}
	mul		$tmp16 $tmp14 $tmp15 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:56
#              absorption_coeff * density * absorption();
	closure		$tmp17 $const5 	%line{56} %argrw{"wr"}
	mul		$tmp18 ___365_absorption_coeff density 	%argrw{"wrr"}
	mul		$tmp19 $tmp17 $tmp18 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:55
#     Volume = scatter_coeff * density * henyey_greenstein(Anisotropy) +
	add		Volume $tmp16 $tmp19 	%line{55} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:60
#   float emission_strength = max(EmissionStrength, 0.0);
	max		emission_strength EmissionStrength $const2 	%line{60} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:61
#   float blackbody_intensity = BlackbodyIntensity;
	assign		blackbody_intensity BlackbodyIntensity 	%line{61} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:63
#   if (emission_strength > 1e-5) {
	gt		$tmp20 emission_strength $const3 	%line{63} %argrw{"wrr"}
	if		$tmp20 40 40 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:64
#     Volume += emission_strength * EmissionColor * emission();
	closure		$tmp21 $const6 	%line{64} %argrw{"wr"}
	mul		$tmp22 emission_strength EmissionColor 	%argrw{"wrr"}
	mul		$tmp23 $tmp21 $tmp22 	%argrw{"wrr"}
	add		Volume Volume $tmp23 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:67
#   if (blackbody_intensity > 1e-3) {
	gt		$tmp24 blackbody_intensity $const7 	%line{67} %argrw{"wrr"}
	if		$tmp24 67 67 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:68
#     float T = Temperature;
	assign		___368_T Temperature 	%line{68} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:72
#     if (getattribute(TemperatureAttribute, temperature)) {
	getattribute	$tmp25 TemperatureAttribute ___368_temperature 	%line{72} %argrw{"wrw"}
	if		$tmp25 47 47 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:73
#       T *= max(temperature, 0.0);
	max		$tmp26 ___368_temperature $const2 	%line{73} %argrw{"wrr"}
	mul		___368_T ___368_T $tmp26 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:76
#     T = max(T, 0.0);
	max		___368_T ___368_T $const2 	%line{76} %argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:79
#     float T4 = (T * T) * (T * T);
	mul		$tmp27 ___368_T ___368_T 	%line{79} %argrw{"wrr"}
	mul		$tmp28 ___368_T ___368_T 	%argrw{"wrr"}
	mul		___368_T4 $tmp27 $tmp28 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:80
#     float sigma = 5.670373e-8 * 1e-6 / M_PI;
	mul		$tmp29 $const8 $const9 	%line{80} %argrw{"wrr"}
	div		___368_sigma $tmp29 $const10 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:81
#     float intensity = sigma * mix(1.0, T4, blackbody_intensity);
	mix		$tmp30 $const1 ___368_T4 blackbody_intensity 	%line{81} %argrw{"wrrr"}
	mul		___368_intensity ___368_sigma $tmp30 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:83
#     if (intensity > 1e-5) {
	gt		$tmp31 ___368_intensity $const3 	%line{83} %argrw{"wrr"}
	if		$tmp31 67 67 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:84
#       color bb = blackbody(T);
	blackbody	___370_bb ___368_T 	%line{84} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:85
#       float l = luminance(bb);
	luminance	___370_l ___370_bb 	%line{85} %argrw{"wr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:87
#       if (l != 0.0) {
	neq		$tmp32 ___370_l $const2 	%line{87} %argrw{"wrr"}
	if		$tmp32 67 67 	%argrw{"r"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:88
#         bb *= BlackbodyTint * intensity / l;
	mul		$tmp33 BlackbodyTint ___368_intensity 	%line{88} %argrw{"wrr"}
	div		$tmp34 $tmp33 ___370_l 	%argrw{"wrr"}
	mul		___370_bb ___370_bb $tmp34 	%argrw{"wrr"}
# /home/sources/buildbot-worker-linux_centos7/linux_290/blender.git/intern/cycles/kernel/shaders/node_principled_volume.osl:89
#         Volume += bb * emission();
	closure		$tmp35 $const6 	%line{89} %argrw{"wr"}
	mul		$tmp36 $tmp35 ___370_bb 	%argrw{"wrr"}
	add		Volume Volume $tmp36 	%argrw{"wrr"}
	end
